package com.ycg.blog.util;

import cn.hutool.core.util.RandomUtil;

/**
 * @author YCG
 * @date 2024-02-28 14:59
 * @description 随机汉字工具类
 */
public class RandomUtils {
    public static String randomChinese(long length) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < length; i++) {
            int char1 = RandomUtil.randomInt('\u4E00', '\u4FFF');
            sb.append((char) char1);
        }
        return sb.toString();
    }
}
